<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <form action="index.php">
      <!-- 表单的提交按钮 -->
      <!-- <input type="submit" value=""> -->
      <input type="button" value="提交" />
    </form>
    <script>
      var input = document.querySelector('input[type="button"]');
      input.onclick = function () {
        console.log("ok");
      };
    </script>
  </body>
</html>

